import { checkStr } from "@/utils/judge";
// import url from "@/axios/url";
import { getDict } from "@/api/common";
// const { mesUrl } = url();
let vm = null;
const sendThis = (_this) => {
  vm = _this;
};
export { sendThis };
//存放柜区域
// 列表头按钮配置
export const operateList = {
  data () {
    const _this = this;
    return {
      operateList: [
        {
          name: $i18n.t("common.export"),
          type: "primary",
          icon: "el-icon-download",
          handleName: "export", //点击时返回的标识
          // url: exportUrl,
          //auth: "auth:operlog:export", //权限字段
        },
      ],
    };
  },
};
// 行末按钮配置
export const rowConfig = [
];

// 搜索条件配置
export const searchConfig = {
  data () {
    const _this = this;
    return {
      searchConfig: {
        inline: true,
        formDesc: {
          uwbShortCode: {
            type: "input",
            label: $i18n.t("keyInventory.uwbShortCode"),
          },
          keyCode: {
            type: "input",
            label: $i18n.t("keyInventory.keyCode"),
          },
          existCabinetType: {
            type: "select",
            label: $i18n.t("keyInventory.existCabinetType"),
            prop: {
              value: "value",
              text: "text",
            },
            options: [
              {
                value: "1",
                text: "在柜"
              },
              {
                value: "2",
                text: "不在柜"
              },
            ],
          },
        },
      },
    };
  },
};

var validatePass = (rule, value, callback) => {
  setTimeout(() => {
    if (!checkStr(value, "english-number")) {
      callback(new Error($i18n.t("mesProcess.rule8")));
    } else {
      callback();
    }
  }, 100);
};
// 新增/删除表单配置
export const formDescDialogMinxin = {
  data () {
    const self = this;
    return {
      formDescDialog: {
        span: 24,
        disabled: false,
        isShowSubmitBtn: true,
        rules: {
        },
        formDesc: {
        },
      },
    };
  },
};

